#/usr/bin/python
#-*-<coding=UTF-8>-*-

"""
本例展示了
"""

import wx

class Dialog(wx.Dialog):
    
    def __init__(self):
        wx.Dialog.__init__(self,parent=None,id=-1,title="",pos=wx.DefaultPosition,size=wx.DefaultSize)
        dialog = wx.MessageDialog(None,"Is this the coolest thing ever!","MessageDialog",wx.YES_NO|wx.ICON_QUESTION)

        """
        ShowModal()方法将对话框对模式框架的方式显示.这意味着对话框关闭之前,应用程序中别的窗口不能响应用户事件.
        ShowModal()方法返回值是一个整数,对于wx.MessageDialog,返回值是下面的常量之一:wx.ID_YES,wx.ID_NO,wx.ID_CANCEL,wx.ID_OK.
        """
        result = dialog.ShowModal()

    def OnButton(self):
        dialog.Destroy()


if __name__ == "__main__":
    app = wx.PySimpleApp()
    dialog = Dialog()
    app.MainLoop()

